﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace File4
{
    class Program
    {
        static void Main(string[] args)
        {   
            int b = 0;
            int a = 0;
            string[] s1 = File.ReadAllLines("Text1.txt");
            //string s = File.ReadAllText("Text1.txt");
            //char[] c = s.ToCharArray();
            for (int q=0;q<s1.Length;q++)
            {
                string s = s1[q];
                string[] s2 = s.Split(' ');
                int i = 0;
                while (i != s.Length)
                {
                    if (s[i] != ' ' && s[i] != '\n' && s[i] != '\r' && s[i] != '\t')
                    {
                        a++;
                    }
                    if ((i < s2.Length) && (s2[i] != ""))
                    {
                        b++;
                    }
                    i++;
                }
            }
            /*for (int q=0;q<s1.Length;q++)
            {
                while (i != c.Length)
                {
                    if (c[i] != ' ' && c[i] != '\n' && c[i] != '\r' && c[i] != '\t')
                    {
                        a++;
                    }
                    if ((j < s2.Length) && (s2[j] != ""))
                    {
                        b++;
                    }
                    i++;
                    j++;
                }
            }*/
            Console.WriteLine("В файле содержиться {0} символов, {1} строки и {2} слов", a, s1.Length, b);
            Console.ReadKey();
        }
    }
}
    
           
